
#include "stm32l4xx_hal.h"
#include "shell_port.h"
#include "usart.h"

SHELL_TypeDef shell;


void low_shellWrite(const char ch)
{
	while (HAL_UART_Transmit(&huart1, (void *)&ch, 1, 1000) != HAL_OK);
}

int8_t low_shellRead(char *ch)
{
	if (HAL_UART_Receive(&huart1, (void *)ch, 1, 50) != HAL_OK)
		return -1;
	return 0;
}

void shellInitAll(void)
{
	shellInit(&shell, low_shellRead, low_shellWrite);
}














